Synchronize domain time updates between CPUs.
read_lock_irqsave(&time_lock, flags);
+ spin_lock(&d->time_lock);
+
si->time_version1++;
wmb();
wmb();
si->time_version2++;
+ spin_unlock(&d->time_lock);
+
read_unlock_irqrestore(&time_lock, flags);
}
memcpy(&ed->thread, &idle0_exec_domain.thread, sizeof(ed->thread));
+ spin_lock_init(&d->time_lock);
+
spin_lock_init(&d->page_alloc_lock);
INIT_LIST_HEAD(&d->page_list);
INIT_LIST_HEAD(&d->xenpage_list);
};
struct domain {
- domid_t id;
- s_time_t create_time;
+ domid_t id;
+ s_time_t create_time;
- shared_info_t *shared_info; /* shared data area */
+ shared_info_t *shared_info; /* shared data area */
+ spinlock_t time_lock;
spinlock_t page_alloc_lock; /* protects all the following fields */
struct list_head page_list; /* linked list, of size tot_pages */